Test latency jitter under stress condition Single-threaded executor Default autoware with hot path
In [1]:
from caret_analyze.plot import Plot
from caret_analyze.plot import chain_latency
from caret_analyze import Application, Architecture, Lttng
from bokeh.plotting import output_notebook, figure, show
from caret_analyze import Architecture, Application, Lttng
from bokeh.plotting import output_notebook
output_notebook()
End-to-End path¶
In [34]:
lttng = Lttng('./single_threaded_executor_stress')
arch = Architecture('yaml','./architecture_with_e2e_path.yaml')
# arch = Architecture('lttng','./single_threaded_executor_normal')
app = Application(arch, lttng)
converting: 318848it [00:17, 18542.35it/s]
318732 events found.
loading: 100%|███████████████████████████████████████████████████████████▉| 318730/318732 [00:09<00:00, 33349.17it/s]
In [3]:
# arch.export('architecture.yaml')
In [ ]:
# p = arch.search_paths('/FrontLidarDriver','/RayGroundFilter','/MPCController','/VehicleDBWSystem')
# p[0].summary.pprint()
In [13]:
# arch.add_path('e2e_path',p[0])
# app =Application(arch,lttng)
In [14]:
# arch.export('architecture_with_e2e_path.yaml')
In [35]:
path = app.get_path('e2e_path')
path.verify()
WARNING : 2024-01-05 15:49:52 | 'caret/rclcpp' may not be used in subscriber of '/PointsTransformerFront'. WARNING : 2024-01-05 15:49:52 | 'caret/rclcpp' may not be used in subscriber of '/PointCloudFusion'. WARNING : 2024-01-05 15:49:52 | 'caret/rclcpp' may not be used in subscriber of '/RayGroundFilter'. WARNING : 2024-01-05 15:49:52 | 'caret/rclcpp' may not be used in subscriber of '/EuclideanClusterDetector'. WARNING : 2024-01-05 15:49:52 | 'caret/rclcpp' may not be used in subscriber of '/ObjectCollisionEstimator'. WARNING : 2024-01-05 15:49:52 | 'caret/rclcpp' may not be used in subscriber of '/BehaviorPlanner'. WARNING : 2024-01-05 15:49:52 | 'caret/rclcpp' may not be used in subscriber of '/MPCController'. WARNING : 2024-01-05 15:49:52 | 'caret/rclcpp' may not be used in subscriber of '/VehicleInterface'. WARNING : 2024-01-05 15:49:52 | 'caret/rclcpp' may not be used in subscriber of '/VehicleDBWSystem'.
Out[35]:
False
In [36]:
chain_latency(path, granularity='node', lstrip_s=0, rstrip_s=0)
Out[36]:
In [37]:
chain_latency(path, granularity='end-to-end', lstrip_s=0, rstrip_s=0)
Out[37]:
In [38]:
# plot best case
plot = Plot.create_response_time_timeseries_plot(path, case='best')
plot.show()
BokehUserWarning: out of range integer may result in loss of precision BokehUserWarning: out of range integer may result in loss of precision
In [39]:
# plot best case
plot = Plot.create_response_time_histogram_plot(path, case='best')
plot.show()
WARNING : 2024-01-05 15:50:56 | The maximum number of legends drawn by default is 20. If you want all legends to be displayed, please specify the `full_legends` option to True.
In [42]:
# plot best case
plot = Plot.create_response_time_stacked_bar_plot(path, case='best')
plot.show()
BokehUserWarning: out of range integer may result in loss of precision BokehUserWarning: out of range integer may result in loss of precision
Hot Path¶
In [43]:
lttng = Lttng('./single_threaded_executor_stress')
arch = Architecture('yaml','./architecture_with_hot_path.yaml')
# arch = Architecture('lttng','./single_threaded_executor_normal')
app = Application(arch, lttng)
318730 events found.
loading: 100%|████████████████████████████████████████████████████████████| 318730/318730 [00:09<00:00, 32918.10it/s]
In [44]:
path = app.get_path('hot_path')
path.verify()
WARNING : 2024-01-05 15:54:21 | 'caret/rclcpp' may not be used in subscriber of '/PointsTransformerFront'. WARNING : 2024-01-05 15:54:21 | 'caret/rclcpp' may not be used in subscriber of '/PointCloudFusion'. WARNING : 2024-01-05 15:54:21 | 'caret/rclcpp' may not be used in subscriber of '/RayGroundFilter'. WARNING : 2024-01-05 15:54:21 | 'caret/rclcpp' may not be used in subscriber of '/EuclideanClusterDetector'. WARNING : 2024-01-05 15:54:21 | 'caret/rclcpp' may not be used in subscriber of '/ObjectCollisionEstimator'.
Out[44]:
False
In [45]:
chain_latency(path, granularity='node', lstrip_s=0, rstrip_s=0)
Out[45]:
In [46]:
chain_latency(path, granularity='end-to-end', lstrip_s=0, rstrip_s=0)
Out[46]:
In [47]:
# plot best case
plot = Plot.create_response_time_timeseries_plot(path, case='best')
plot.show()
BokehUserWarning: out of range integer may result in loss of precision BokehUserWarning: out of range integer may result in loss of precision
In [48]:
# plot best case
plot = Plot.create_response_time_histogram_plot(path, case='best')
plot.show()
WARNING : 2024-01-05 15:54:30 | The maximum number of legends drawn by default is 20. If you want all legends to be displayed, please specify the `full_legends` option to True.
In [49]:
# plot best case
plot = Plot.create_response_time_stacked_bar_plot(path, case='best')
plot.show()
BokehUserWarning: out of range integer may result in loss of precision BokehUserWarning: out of range integer may result in loss of precision
In [ ]: